package data;

import java.util.ArrayList;
import java.util.Collection;

public class SetExample {
	
	private ArrayList<Example> set;
	
	public SetExample()
	{
		this.set = new ArrayList<Example>();
	}
	
	public boolean add(Example e)
	{
		return set.add(e);
	}
	
	public boolean addAll(Collection<? extends Example> c)
	{
		return set.addAll(c);
	}
	
	public double[][] dataInput()
	{
		double[][] ret = new double[set.size()][];
		
		for(int i = 0; i< set.size(); i++)
		{
			ret[i] = set.get(i).getInputs();
		}
		
		return ret;
	}
	
	public double[][] dataOutput()
	{
		double[][] ret = new double[set.size()][];
		
		for(int i = 0; i< set.size(); i++)
		{
			ret[i] = set.get(i).getOutputs();
		}
		
		return ret;
	}

}
